| 1 |
<?php |
| 2 |
/** |
| 3 |
* categoryEditForm.php |
| 4 |
* |
| 5 |
* Shows the setup page at the admin panel. |
| 6 |
* |
| 7 |
* PHP versions 5 |
| 8 |
* |
| 9 |
* @category UserAccessManager |
| 10 |
* @package UserAccessManager |
| 11 |
* @author Alexander Schneider <alexanderschneider85@googlemail.com> |
| 12 |
* @copyright 2008-2010 Alexander Schneider |
| 13 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 |
| 14 |
* @version SVN: $Id$ |
| 15 |
* @link http://wordpress.org/extend/plugins/user-access-manager/ |
| 16 |
*/ |
| 17 |
|
| 18 |
global $userAccessManager; |
| 19 |
$uamUserGroups |
| 20 |
= &$userAccessManager->getAccessHandler()->getUserGroups(); |
| 21 |
|
| 22 |
if (isset($_GET['tag_ID'])) { |
| 23 |
$categoryId = $_GET['tag_ID']; |
| 24 |
|
| 25 |
$userGroupsForObject |
| 26 |
= &$userAccessManager->getAccessHandler()->getUserGroupsForCategory($categoryId); |
| 27 |
} else { |
| 28 |
$userGroupsForObject = array(); |
| 29 |
} |
| 30 |
|
| 31 |
?> |
| 32 |
<table class="form-table"> |
| 33 |
<tbody> |
| 34 |
<tr> |
| 35 |
<th> |
| 36 |
<label for="description"><?php echo TXT_SET_UP_USERGROUPS; ?></label> |
| 37 |
</th> |
| 38 |
<td> |
| 39 |
<?php |
| 40 |
if (isset($uamUserGroups)) { |
| 41 |
include 'groupSelectionForm.php'; |
| 42 |
} else { |
| 43 |
?> |
| 44 |
<a href='admin.php?page=uam_usergroup'><?php echo TXT_CREATE_GROUP_FIRST; ?></a> |
| 45 |
<?php |
| 46 |
} |
| 47 |
?> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
</tbody> |
| 51 |
</table> |
| 52 |
<?php |
| 53 |
if (isset($_GET['action'])) { |
| 54 |
$action = $_GET['action']; |
| 55 |
} else { |
| 56 |
$action = null; |
| 57 |
} |
| 58 |
|
| 59 |
if ($action != 'edit') { |
| 60 |
?> |
| 61 |
<style type="text/css"> |
| 62 |
.submit { |
| 63 |
display: none; |
| 64 |
position: relative; |
| 65 |
} |
| 66 |
</style> |
| 67 |
<p class="submit" style="display: block; position: relative;"> |
| 68 |
<input class="button" type="submit" value="Add New Category" name="submit" /> |
| 69 |
</p> |
| 70 |
<?php |
| 71 |
} |